﻿namespace DigitalTrainSuite {


	partial class DataSetLayout
	{
		partial class RFIDSensorDataTable
		{
		}
	
		partial class TurnoutControlDataTable
		{
		}
	
		partial class TrainDataTable
		{
			public TrainRow findByLocoAddress(int locoAddress)
			{
				foreach (TrainRow row in this.Rows)
				{
					if (row.locoAddress == locoAddress)
					{
						return row;
					}
				}
				return null;
			}
		}
	
		partial class ConnectionDataTable
		{
			public ConnectionRow findByTrackIdNode(int id, int node)
			{
				foreach (ConnectionRow row in this.Rows)
				{
					if ((row.trackAId == id && row.trackANode == node) || (row.trackBId == id && row.trackBNode == node))
						return row;
				}
				return null;
			}
		}
	
		partial class TrackDataTable
		{
		}
	}
}
